/**
 * 静态路由（默认路由）- 放不需要筛选的路由,所有人都能看到的路由
 */
export const staticRoutes = [
    {
        path: "/text",
        component: () => import('../views/text'),
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/login'),
        meta: {
            goTo:true
        }
    },
    /**
     当一级路由只有一个子集路由的时候
     侧边栏 sideBar 不会显示一级菜单,直接显示这个子集菜单
     */
    {
        path: '/',
        component: () => import('../views/index'),
        redirect: '/recommend',
        children: [
            {
                // 资源页
                path: '/recommend',
                component: () => import('../views/recommend'),
                redirect: '/recommend/item',
                meta: {
                    goTo:true
                },
                children: [
                    {
                        path: '/recommend/item',
                        component: () => import('../views/recommend/components/item/index.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                    {
                        path: '/recommend/works',
                        component: () => import('../views/recommend/components/works/index.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                    {
                        path: '/recommend/tutorial',
                        component: () => import('../views/recommend/components/tutorial/index.vue'),
                        meta: {
                            goTo:true
                        },
                    }
                ]
            },
            {
                path: '/discovery',
                component: () => import('../views/discovery'),
                redirect: '/discovery/vip_zone',
                meta: {
                    goTo:true
                },
                children: [
                    {
                        path: '/discovery/vip_zone',
                        name: 'Vip_zone',
                        component: () => import('../views/discovery/pages/vip.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                    {
                        path: '/discovery/video_course',
                        component: () => import('../views/discovery/pages/video.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                    {
                        path: '/discovery/live_course',
                        component: () => import('../views/discovery/pages/live.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                    {
                        path: '/discovery/major_course',
                        component: () => import('../views/discovery/pages/major.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                    {
                        path: '/discovery/zone_list',
                        component: () => import('../views/discovery/pages/zone.vue'),
                        meta: {
                            goTo:true
                        },
                    },
                ]
            },
            {
                path: '/training', //浏览器现实的路由
                component: () => import('../views/training'),  //组件路径
                redirect: "/training/view_records", //重定向
                children: [
                    {
                        path: '/training/mediaCache',
                        component: () => import("../views/training/views/mediaCache/index.vue")
                    },
                    {
                        path: '/training/collections',
                        component: () => import("../views/training/views/collections/index.vue")
                    },
                    {
                        path: '/training/view_records',
                        component: () => import("../views/training/views/view_records/index.vue")
                    }
                ]
            },
            {
                path: '/communication',
                component: () => import('../views/communication'),
                redirect: '/communication/systemNote',
                children: [
                    {
                        path: '/communication/systemNote',
                        component: () => import('../views/communication/product/systemNote.vue')
                    },
                    {
                        path: '/communication/orderNote',
                        component: () => import('../views/communication/product/orderNote.vue')
                    },
                    {
                        path: '/communication/interactNote',
                        component: () => import('../views/communication/product/interactNote.vue'),
                        children: [{
                            path: '/communication/systemNote',
                            component: () => import('../views/communication/product/systemNote.vue'),
                        },
                            {
                                path: '/communication/orderNote',
                                component: () => import('../views/communication/product/orderNote.vue'),
                            },
                            {
                                path: '/communication/interactNote',
                                component: () => import('../views/communication/product/interactNote.vue'),
                            }
                        ]
                    },
                ]
            },
            //个人中心路由
            {
                path: '/center',
                component: () => import('../views/center'),
                redirect: '/center/dynamics',
                children: [
                    {
                        path: '/center/dynamics',
                        component: () => import('../views/center/dynamics'),
                    },
                    {
                        path: '/level-instruction',
                        component: () => import('../views/center/levelInstruction')
                    },
                    {
                        path: '/my_member',
                        component: () => import('../views/center/myMember')
                    },
                    {
                        path: '/center/wallet',
                        component: () => import('../views/center/wallet')
                    },
                    {
                        path: '/center/coupons',
                        component: () => import('../views/center/coupons')
                    },
                    {
                        path: '/center/buyer/my_order',
                        component: () => import('../views/center/myOrder')
                    },
                    {
                        path: '/center/seller/orders_manager',
                        component: () => import('../views/center/mySellOrder/ordersManager')
                    },
                    {
                        path: '/center/seller/goods_manager',
                        component: () => import('../views/center/mySellOrder/goodsManager')
                    },
                    {
                        path: '/center/seller/customers_manager',
                        component: () => import('../views/center/mySellOrder/customersManager')
                    },
                    {
                        path: '/center/seller/pending_payments_manager',
                        component: () => import('../views/center/mySellOrder/pendingPaymentsManager')
                    },
                    {
                        path: '/mine/sell/minePreferentialManagement',
                        component: () => import('../views/center/mySellOrder/minePreferentialManagement')
                    },
                    {
                        path: '/mine/sell/mineReviewsManagement',
                        component: () => import('../views/center/mySellOrder/mineReviewsManagement')
                    },
                    {
                        path: '/center/deposit',
                        component: () => import('../views/center/mySellOrder/deposit')
                    },
                    {
                        path: '/center/edit_info',
                        component: () => import('../views/center/editInfo')
                    },
                
                ]
                
            },
        ]
    },
    // center
    {
        path: '/404',
        name: '404',
        component: () => import('../views/error/404.vue'),
    },
    {
        path: '/detail',
        component: () => import('../views/detail/index.vue')
    },
    {
        path: '/:pathMatch(.*)',
        name: 'Any',
        redirect: '/404',
        meta: {
            hidden: true
        }
    },
];


